package mms

class Complaints {

//    static hasMany = []
//    static belongsTo = []
//    static transients = []


 
  Long idnum 
  Date complaintTime = new Date()
  String complainantName = ""
  String contactTel = ""
  String faultType = ""
  String complainantContent = ""
  String companyType = ""
  Long companyId = 0
  String companyName = ""
  String companyAddress = ""
  Integer haveDispose = 0
  Date disposeTime 
  String disposeName = ""
  String disposeContent = ""
  


//    table 'xedu_article'
//    sort  lastTime
    static mapping = {
            idnum column:'idnum' 
            complaintTime column:'complaintTime' 
            complainantName column:'complainantName' 
            contactTel column:'contactTel' 
            faultType column:'faultType' 
            complainantContent column:'complainantContent' 
            companyType column:'companyType' 
            companyId column:'companyId' 
            companyName column:'companyName' 
            companyAddress column:'companyAddress' 
            haveDispose column:'haveDispose' 
            disposeTime column:'disposeTime' 
            disposeName column:'disposeName' 
            disposeContent column:'disposeContent' 
    }
    //blank 
    //email
    //inList
    //matches 
    //nullable 
    //size
    //unique
    //url 
    static constraints = {
        idnum(nullable:true,blank:true)
        complaintTime (nullable:true,blank:true)
        complainantName (nullable:true,blank:true)
        contactTel (nullable:true,blank:true)
        faultType(nullable:true,blank:true)
        complainantContent(nullable:true,blank:true)
        companyType(nullable:true,blank:true)
        companyId(nullable:true,blank:true)
        companyName(nullable:true,blank:true)
        companyAddress(nullable:true,blank:true)
        haveDispose(nullable:true,blank:true)
        disposeTime(nullable:true,blank:true)
        disposeName(nullable:true,blank:true)
        disposeContent(nullable:true,blank:true)
    }

    String toString() { 
        "${complainantName} ${contactTel}"
    } 
}
